<html>
<head>
  <title>PL Profiler Report for tpcb-problem-fixed</title>

  <script language="javascript">
    // ----
    // toggle_div()
    //
    //  JS function to toggle one of the functions to show/block.
    // ----
    function toggle_div(hs_id, div_id) {
        var h_elem = document.getElementById(hs_id);
        var d_elem = document.getElementById(div_id);
        if (d_elem.style.display == "block") {
            d_elem.style.display = "none";
            h_elem.innerHTML = "show";
        } else {
            d_elem.style.display = "block";
            h_elem.innerHTML = "hide";
        }
    }

    // ----
    // set_stat_bars()
    // ----
    function set_stat_bars() {
        // Loop over all tables that are of linestats class.
        var tbls = document.getElementsByClassName("linestats");
        for (var i = 0; i < tbls.length; i++) {
            tbl = tbls[i];
            rws = tbl.rows;

            // Get the function level totals of the counters from the
            // second row (the pseudo line-0 row).
            vals = rws[1].getElementsByTagName("td");
            var exec_max = parseFloat(vals[1].innerHTML)
            var total_max = parseFloat(vals[2].innerHTML)
            var longest_max = parseFloat(vals[3].innerHTML)

            // Guard against division by zero errors.
            if (exec_max == 0) exec_max = 1;
            if (total_max == 0) total_max = 1;
            if (longest_max == 0) longest_max = 1;

            // Now we can calculate and set the bars relative to those
            // function level totals.
            for (var j = 1; j < rws.length; j++) {
                var vals = rws[j].getElementsByTagName("td");

                var val = parseFloat(vals[1].innerHTML)
                // var pct = val / exec_max * 100;
                // vals[1].style.backgroundSize = pct + "% 100%";
                // vals[1].style.backgroundSize = "0% 100%";
                vals[1].innerHTML = "<code>" + val.toLocaleString() + "</code>";

                val = parseFloat(vals[2].innerHTML)
                pct = val / total_max * 100;
                pct_str = "(" + pct.toFixed(2) + "%)"
                var need_spc = 10 - pct_str.length;
                for (var k = 0; k < need_spc; k++) {
                    pct_str = "&nbsp;" + pct_str;
                }
                vals[2].style.backgroundSize = pct + "% 100%";
                vals[2].innerHTML = "<code>" + val.toLocaleString() + "&nbsp;&micro;s" + pct_str + "</code>";

                val = parseFloat(vals[3].innerHTML)
                // pct = val / longest_max * 100;
                // vals[3].style.backgroundSize = pct + "% 100%";
                vals[3].innerHTML = "<code>" + val.toLocaleString() + "&nbsp;&micro;s" + "</code>";
            }
        }
    }
  </script>


  <style>
    h1,h2,h3,h4	{ color:#2222AA;
                }

    h1		{ font-family: Helvetica,Arial;
                  font-weight: 700;
                  font-size: 24pt;
                }

    h2		{ font-family: Helvetica,Arial;
                  font-weight: 700;
                  font-size: 18pt;
                }

    h3,h4	{ font-family: Helvetica,Arial;
                  font-weight: 700;
                  font-size: 16pt;
                }

    p,li,dt,dd	{ font-family: Helvetica,Arial;
                  font-size: 14pt;
                }

    pre		{ font-family: Courier,Fixed;
                  font-size: 14pt;
                }

    samp	{ font-family: Courier,Fixed;
                  font-weight: 900;
                  font-size: 14pt;
                }

    big		{ font-weight: 900;
                  font-size: 120%;
                }

    .bar        { background-color: white;
                  background-image: url();
                  background-repeat: no-repeat;
                }
  </style>

</head>
<body bgcolor="#ffffff" onload="set_stat_bars()">
<h1>PL Profiler Report for tpcb-problem-fixed</h1>
<h2>PL/pgSQL Call Graph</h2>
<center>
<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" width="800" height="130" onload="init(evt)" viewBox="0 0 800 130" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<defs >
	<linearGradient id="background" y1="0" y2="1" x1="0" x2="0" >
		<stop stop-color="#eeeeee" offset="5%" />
		<stop stop-color="#eeeeb0" offset="95%" />
	</linearGradient>
</defs>
<style type="text/css">
	.func_g:hover { stroke:black; stroke-width:0.5; cursor:pointer; }
</style>
<script type="text/ecmascript">
<![CDATA[
	var details, svg;
	function init(evt) { 
		details = document.getElementById("details").firstChild; 
		svg = document.getElementsByTagName("svg")[0];
	}
	function s(info) { details.nodeValue = "Function: " + info; }
	function c() { details.nodeValue = ' '; }
	function find_child(parent, name, attr) {
		var children = parent.childNodes;
		for (var i=0; i<children.length;i++) {
			if (children[i].tagName == name)
				return (attr != undefined) ? children[i].attributes[attr].value : children[i];
		}
		return;
	}
	function orig_save(e, attr, val) {
		if (e.attributes["_orig_"+attr] != undefined) return;
		if (e.attributes[attr] == undefined) return;
		if (val == undefined) val = e.attributes[attr].value;
		e.setAttribute("_orig_"+attr, val);
	}
	function orig_load(e, attr) {
		if (e.attributes["_orig_"+attr] == undefined) return;
		e.attributes[attr].value = e.attributes["_orig_"+attr].value;
		e.removeAttribute("_orig_"+attr);
	}
	function update_text(e) {
		var r = find_child(e, "rect");
		var t = find_child(e, "text");
		var w = parseFloat(r.attributes["width"].value) -3;
		var txt = find_child(e, "title").textContent.replace(/\([^(]*\)/,"");
		t.attributes["x"].value = parseFloat(r.attributes["x"].value) +3;
		
		// Smaller than this size won't fit anything
		if (w < 2*12*0.59) {
			t.textContent = "";
			return;
		}
		
		t.textContent = txt;
		// Fit in full text width
		if (/^ *$/.test(txt) || t.getSubStringLength(0, txt.length) < w)
			return;
		
		for (var x=txt.length-2; x>0; x--) {
			if (t.getSubStringLength(0, x+2) <= w) { 
				t.textContent = txt.substring(0,x) + "..";
				return;
			}
		}
		t.textContent = "";
	}
	function zoom_reset(e) {
		if (e.attributes != undefined) {
			orig_load(e, "x");
			orig_load(e, "width");
		}
		if (e.childNodes == undefined) return;
		for(var i=0, c=e.childNodes; i<c.length; i++) {
			zoom_reset(c[i]);
		}
	}
	function zoom_child(e, x, ratio) {
		if (e.attributes != undefined) {
			if (e.attributes["x"] != undefined) {
				orig_save(e, "x");
				e.attributes["x"].value = (parseFloat(e.attributes["x"].value) - x - 10) * ratio + 10;
				if(e.tagName == "text") e.attributes["x"].value = find_child(e.parentNode, "rect", "x") + 3;
			}
			if (e.attributes["width"] != undefined) {
				orig_save(e, "width");
				e.attributes["width"].value = parseFloat(e.attributes["width"].value) * ratio;
			}
		}
		
		if (e.childNodes == undefined) return;
		for(var i=0, c=e.childNodes; i<c.length; i++) {
			zoom_child(c[i], x-10, ratio);
		}
	}
	function zoom_parent(e) {
		if (e.attributes) {
			if (e.attributes["x"] != undefined) {
				orig_save(e, "x");
				e.attributes["x"].value = 10;
			}
			if (e.attributes["width"] != undefined) {
				orig_save(e, "width");
				e.attributes["width"].value = parseInt(svg.width.baseVal.value) - (10*2);
			}
		}
		if (e.childNodes == undefined) return;
		for(var i=0, c=e.childNodes; i<c.length; i++) {
			zoom_parent(c[i]);
		}
	}
	function zoom(node) { 
		var attr = find_child(node, "rect").attributes;
		var width = parseFloat(attr["width"].value);
		var xmin = parseFloat(attr["x"].value);
		var xmax = parseFloat(xmin + width);
		var ymin = parseFloat(attr["y"].value);
		var ratio = (svg.width.baseVal.value - 2*10) / width;
		
		// XXX: Workaround for JavaScript float issues (fix me)
		var fudge = 0.0001;
		
		var unzoombtn = document.getElementById("unzoom");
		unzoombtn.style["opacity"] = "1.0";
		
		var el = document.getElementsByTagName("g");
		for(var i=0;i<el.length;i++){
			var e = el[i];
			var a = find_child(e, "rect").attributes;
			var ex = parseFloat(a["x"].value);
			var ew = parseFloat(a["width"].value);
			// Is it an ancestor
			if (0 == 0) {
				var upstack = parseFloat(a["y"].value) > ymin;
			} else {
				var upstack = parseFloat(a["y"].value) < ymin;
			}
			if (upstack) {
				// Direct ancestor
				if (ex <= xmin && (ex+ew+fudge) >= xmax) {
					e.style["opacity"] = "0.5";
					zoom_parent(e);
					e.onclick = function(e){unzoom(); zoom(this);};
					update_text(e);
				}
				// not in current path
				else
					e.style["display"] = "none";
			}
			// Children maybe
			else {
				// no common path
				if (ex < xmin || ex + fudge >= xmax) {
					e.style["display"] = "none";
				}
				else {
					zoom_child(e, xmin, ratio);
					e.onclick = function(e){zoom(this);};
					update_text(e);
				}
			}
		}
	}
	function unzoom() {
		var unzoombtn = document.getElementById("unzoom");
		unzoombtn.style["opacity"] = "0.0";
		
		var el = document.getElementsByTagName("g");
		for(i=0;i<el.length;i++) {
			el[i].style["display"] = "block";
			el[i].style["opacity"] = "1";
			zoom_reset(el[i]);
			update_text(el[i]);
		}
	}	
]]>
</script>
<rect x="0.0" y="0" width="800.0" height="130.0" fill="url(#background)"  />
<text text-anchor="middle" x="400.00" y="24" font-size="17" font-family="Verdana" fill="rgb(0,0,0)"  >PL Profiler Report for tpcb-problem-fixed</text>
<text text-anchor="" x="10.00" y="113" font-size="12" font-family="Verdana" fill="rgb(0,0,0)" id="details" > </text>
<text text-anchor="" x="10.00" y="24" font-size="12" font-family="Verdana" fill="rgb(0,0,0)" id="unzoom" onclick="unzoom()" style="opacity:0.0;cursor:pointer" >Reset Zoom</text>
<g class="func_g" onmouseover="s('public.tpcb_upd_branches() oid=66240 (81,747,512 samples, 28.58%)')" onmouseout="c()" onclick="zoom(this)">
<title>public.tpcb_upd_branches() oid=66240 (81,747,512 samples, 28.58%)</title><rect x="33.9" y="49" width="223.0" height="15.0" fill="rgb(247,162,28)" rx="2" ry="2" />
<text text-anchor="" x="36.94" y="59.5" font-size="12" font-family="Verdana" fill="rgb(0,0,0)"  >public.tpcb_upd_branches() oi..</text>
</g>
<g class="func_g" onmouseover="s('public.tpcb_fetch_abalance() oid=66446 (1,248,733 samples, 0.44%)')" onmouseout="c()" onclick="zoom(this)">
<title>public.tpcb_fetch_abalance() oid=66446 (1,248,733 samples, 0.44%)</title><rect x="30.5" y="33" width="3.4" height="15.0" fill="rgb(220,109,7)" rx="2" ry="2" />
<text text-anchor="" x="33.53" y="43.5" font-size="12" font-family="Verdana" fill="rgb(0,0,0)"  ></text>
</g>
<g class="func_g" onmouseover="s('public.tpcb_upd_tellers() oid=66239 (195,487,118 samples, 68.35%)')" onmouseout="c()" onclick="zoom(this)">
<title>public.tpcb_upd_tellers() oid=66239 (195,487,118 samples, 68.35%)</title><rect x="256.9" y="49" width="533.1" height="15.0" fill="rgb(224,156,6)" rx="2" ry="2" />
<text text-anchor="" x="259.87" y="59.5" font-size="12" font-family="Verdana" fill="rgb(0,0,0)"  >public.tpcb_upd_tellers() oid=66239</text>
</g>
<g class="func_g" onmouseover="s('public.tpcb_upd_accounts() oid=66238 (4,335,474 samples, 1.52%)')" onmouseout="c()" onclick="zoom(this)">
<title>public.tpcb_upd_accounts() oid=66238 (4,335,474 samples, 1.52%)</title><rect x="22.1" y="49" width="11.8" height="15.0" fill="rgb(249,68,31)" rx="2" ry="2" />
<text text-anchor="" x="25.11" y="59.5" font-size="12" font-family="Verdana" fill="rgb(0,0,0)"  ></text>
</g>
<g class="func_g" onmouseover="s('all (286,011,539 samples, 100%)')" onmouseout="c()" onclick="zoom(this)">
<title>all (286,011,539 samples, 100%)</title><rect x="10.0" y="81" width="780.0" height="15.0" fill="rgb(254,53,34)" rx="2" ry="2" />
<text text-anchor="" x="13.00" y="91.5" font-size="12" font-family="Verdana" fill="rgb(0,0,0)"  ></text>
</g>
<g class="func_g" onmouseover="s('public.tpcb() oid=66237 (286,011,539 samples, 100.00%)')" onmouseout="c()" onclick="zoom(this)">
<title>public.tpcb() oid=66237 (286,011,539 samples, 100.00%)</title><rect x="10.0" y="65" width="780.0" height="15.0" fill="rgb(245,18,47)" rx="2" ry="2" />
<text text-anchor="" x="13.00" y="75.5" font-size="12" font-family="Verdana" fill="rgb(0,0,0)"  >public.tpcb() oid=66237</text>
</g>
<g class="func_g" onmouseover="s('public.tpcb_ins_history() oid=66241 (1,150,113 samples, 0.40%)')" onmouseout="c()" onclick="zoom(this)">
<title>public.tpcb_ins_history() oid=66241 (1,150,113 samples, 0.40%)</title><rect x="19.0" y="49" width="3.1" height="15.0" fill="rgb(218,110,41)" rx="2" ry="2" />
<text text-anchor="" x="21.98" y="59.5" font-size="12" font-family="Verdana" fill="rgb(0,0,0)"  ></text>
</g>
</svg>

</center>
<h2>List of functions detailed below</h2>
<ul>
<li><a href="#A66237">public.tpcb() oid=66237</a></li>
<li><a href="#A66446">public.tpcb_fetch_abalance() oid=66446</a></li>
<li><a href="#A66241">public.tpcb_ins_history() oid=66241</a></li>
<li><a href="#A66238">public.tpcb_upd_accounts() oid=66238</a></li>
<li><a href="#A66240">public.tpcb_upd_branches() oid=66240</a></li>
<li><a href="#A66239">public.tpcb_upd_tellers() oid=66239</a></li>
</ul>
<h2>All 6 functions (by self_time)</h2>
<a name="A66239" />
<h3>Function public.tpcb_upd_tellers() oid=66239 (<a id="toggle_66239"
                href="javascript:toggle_div('toggle_66239', 'div_66239')">show</a>)</h3>
<p>
self_time = 195,487,118 &micro;s<br/>
total_time = 195,487,118 &micro;s
</p>
<table border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td valign="top"><b><code>public.tpcb_upd_tellers&nbsp;</code></b></td>
    <td><b><code>(par_tid integer,<br/>&nbsp;par_delta integer)</code></b></td>
  </tr>
  <tr>
    <td colspan="2">
      <b><code>&nbsp;&nbsp;&nbsp;&nbsp;RETURNS&nbsp;void</code></b>
    </td>
  </tr>
</table>
<div id="div_66239" style="display: none">
<center>
<table class="linestats" border="1" cellpadding="0" cellspacing="0" width="80%">
  <tr>
    <th width="10%">Line</th>
    <th width="10%">exec_count</th>
    <th width="10%">total_time</th>
    <th width="10%">longest_time</th>
    <th width="60%">Source Code</th>
  </tr>
  <tr>
    <td align="right"><code>0</code></td>
    <td align="right">44902</td>
    <td class="bar" align="right">195487118</td>
    <td align="right">147832</td>
    <td align="left"><code><b>--&nbsp;Function&nbsp;Totals</b></code></td>
  </tr>
  <tr>
    <td align="right"><code>1</code></td>
    <td align="right">0</td>
    <td class="bar" align="right">0</td>
    <td align="right">0</td>
    <td align="left"><code></code></td>
  </tr>
  <tr>
    <td align="right"><code>2</code></td>
    <td align="right">0</td>
    <td class="bar" align="right">0</td>
    <td align="right">0</td>
    <td align="left"><code>BEGIN</code></td>
  </tr>
  <tr>
    <td align="right"><code>3</code></td>
    <td align="right">44902</td>
    <td class="bar" align="right">195377945</td>
    <td align="right">147823</td>
    <td align="left"><code>&nbsp;&nbsp;&nbsp;&nbsp;UPDATE&nbsp;pgbench_tellers&nbsp;SET&nbsp;tbalance&nbsp;=&nbsp;tbalance&nbsp;+&nbsp;par_delta</code></td>
  </tr>
  <tr>
    <td align="right"><code>4</code></td>
    <td align="right">0</td>
    <td class="bar" align="right">0</td>
    <td align="right">0</td>
    <td align="left"><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;WHERE&nbsp;tid&nbsp;=&nbsp;par_tid;</code></td>
  </tr>
  <tr>
    <td align="right"><code>5</code></td>
    <td align="right">0</td>
    <td class="bar" align="right">0</td>
    <td align="right">0</td>
    <td align="left"><code>END;</code></td>
  </tr>
  <tr>
    <td align="right"><code>6</code></td>
    <td align="right">0</td>
    <td class="bar" align="right">0</td>
    <td align="right">0</td>
    <td align="left"><code></code></td>
  </tr>
</table>
</center>
</div>
<a name="A66240" />
<h3>Function public.tpcb_upd_branches() oid=66240 (<a id="toggle_66240"
                href="javascript:toggle_div('toggle_66240', 'div_66240')">show</a>)</h3>
<p>
self_time = 81,747,512 &micro;s<br/>
total_time = 81,747,512 &micro;s
</p>
<table border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td valign="top"><b><code>public.tpcb_upd_branches&nbsp;</code></b></td>
    <td><b><code>(par_bid integer,<br/>&nbsp;par_delta integer)</code></b></td>
  </tr>
  <tr>
    <td colspan="2">
      <b><code>&nbsp;&nbsp;&nbsp;&nbsp;RETURNS&nbsp;void</code></b>
    </td>
  </tr>
</table>
<div id="div_66240" style="display: none">
<center>
<table class="linestats" border="1" cellpadding="0" cellspacing="0" width="80%">
  <tr>
    <th width="10%">Line</th>
    <th width="10%">exec_count</th>
    <th width="10%">total_time</th>
    <th width="10%">longest_time</th>
    <th width="60%">Source Code</th>
  </tr>
  <tr>
    <td align="right"><code>0</code></td>
    <td align="right">44901</td>
    <td class="bar" align="right">81747512</td>
    <td align="right">21177</td>
    <td align="left"><code><b>--&nbsp;Function&nbsp;Totals</b></code></td>
  </tr>
  <tr>
    <td align="right"><code>1</code></td>
    <td align="right">0</td>
    <td class="bar" align="right">0</td>
    <td align="right">0</td>
    <td align="left"><code></code></td>
  </tr>
  <tr>
    <td align="right"><code>2</code></td>
    <td align="right">0</td>
    <td class="bar" align="right">0</td>
    <td align="right">0</td>
    <td align="left"><code>BEGIN</code></td>
  </tr>
  <tr>
    <td align="right"><code>3</code></td>
    <td align="right">44901</td>
    <td class="bar" align="right">81639402</td>
    <td align="right">21174</td>
    <td align="left"><code>&nbsp;&nbsp;&nbsp;&nbsp;UPDATE&nbsp;pgbench_branches&nbsp;SET&nbsp;bbalance&nbsp;=&nbsp;bbalance&nbsp;+&nbsp;par_delta</code></td>
  </tr>
  <tr>
    <td align="right"><code>4</code></td>
    <td align="right">0</td>
    <td class="bar" align="right">0</td>
    <td align="right">0</td>
    <td align="left"><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;WHERE&nbsp;bid&nbsp;=&nbsp;par_bid;</code></td>
  </tr>
  <tr>
    <td align="right"><code>5</code></td>
    <td align="right">0</td>
    <td class="bar" align="right">0</td>
    <td align="right">0</td>
    <td align="left"><code>END;</code></td>
  </tr>
  <tr>
    <td align="right"><code>6</code></td>
    <td align="right">0</td>
    <td class="bar" align="right">0</td>
    <td align="right">0</td>
    <td align="left"><code></code></td>
  </tr>
</table>
</center>
</div>
<a name="A66237" />
<h3>Function public.tpcb() oid=66237 (<a id="toggle_66237"
                href="javascript:toggle_div('toggle_66237', 'div_66237')">show</a>)</h3>
<p>
self_time = 3,291,322 &micro;s<br/>
total_time = 286,005,315 &micro;s
</p>
<table border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td valign="top"><b><code>public.tpcb&nbsp;</code></b></td>
    <td><b><code>(par_aid integer,<br/>&nbsp;par_bid integer,<br/>&nbsp;par_tid integer,<br/>&nbsp;par_delta integer)</code></b></td>
  </tr>
  <tr>
    <td colspan="2">
      <b><code>&nbsp;&nbsp;&nbsp;&nbsp;RETURNS&nbsp;integer</code></b>
    </td>
  </tr>
</table>
<div id="div_66237" style="display: none">
<center>
<table class="linestats" border="1" cellpadding="0" cellspacing="0" width="80%">
  <tr>
    <th width="10%">Line</th>
    <th width="10%">exec_count</th>
    <th width="10%">total_time</th>
    <th width="10%">longest_time</th>
    <th width="60%">Source Code</th>
  </tr>
  <tr>
    <td align="right"><code>0</code></td>
    <td align="right">44901</td>
    <td class="bar" align="right">286005315</td>
    <td align="right">148867</td>
    <td align="left"><code><b>--&nbsp;Function&nbsp;Totals</b></code></td>
  </tr>
  <tr>
    <td align="right"><code>1</code></td>
    <td align="right">0</td>
    <td class="bar" align="right">0</td>
    <td align="right">0</td>
    <td align="left"><code></code></td>
  </tr>
  <tr>
    <td align="right"><code>2</code></td>
    <td align="right">0</td>
    <td class="bar" align="right">0</td>
    <td align="right">0</td>
    <td align="left"><code>DECLARE</code></td>
  </tr>
  <tr>
    <td align="right"><code>3</code></td>
    <td align="right">0</td>
    <td class="bar" align="right">0</td>
    <td align="right">0</td>
    <td align="left"><code>&nbsp;&nbsp;&nbsp;&nbsp;var_abalance&nbsp;&nbsp;&nbsp;&nbsp;integer;</code></td>
  </tr>
  <tr>
    <td align="right"><code>4</code></td>
    <td align="right">0</td>
    <td class="bar" align="right">0</td>
    <td align="right">0</td>
    <td align="left"><code>BEGIN</code></td>
  </tr>
  <tr>
    <td align="right"><code>5</code></td>
    <td align="right">44901</td>
    <td class="bar" align="right">4817079</td>
    <td align="right">13903</td>
    <td align="left"><code>&nbsp;&nbsp;&nbsp;&nbsp;var_abalance&nbsp;=&nbsp;tpcb_upd_accounts(par_aid,&nbsp;par_delta);</code></td>
  </tr>
  <tr>
    <td align="right"><code>6</code></td>
    <td align="right">44901</td>
    <td class="bar" align="right">196304468</td>
    <td align="right">147862</td>
    <td align="left"><code>&nbsp;&nbsp;&nbsp;&nbsp;PERFORM&nbsp;tpcb_upd_tellers(par_tid,&nbsp;par_delta);</code></td>
  </tr>
  <tr>
    <td align="right"><code>7</code></td>
    <td align="right">44901</td>
    <td class="bar" align="right">82688022</td>
    <td align="right">21202</td>
    <td align="left"><code>&nbsp;&nbsp;&nbsp;&nbsp;PERFORM&nbsp;tpcb_upd_branches(par_bid,&nbsp;par_delta);</code></td>
  </tr>
  <tr>
    <td align="right"><code>8</code></td>
    <td align="right">44901</td>
    <td class="bar" align="right">2048015</td>
    <td align="right">888</td>
    <td align="left"><code>&nbsp;&nbsp;&nbsp;&nbsp;PERFORM&nbsp;tpcb_ins_history(par_aid,&nbsp;par_tid,&nbsp;par_bid,&nbsp;par_delta);</code></td>
  </tr>
  <tr>
    <td align="right"><code>9</code></td>
    <td align="right">44901</td>
    <td class="bar" align="right">10028</td>
    <td align="right">77</td>
    <td align="left"><code>&nbsp;&nbsp;&nbsp;&nbsp;RETURN&nbsp;var_abalance;</code></td>
  </tr>
  <tr>
    <td align="right"><code>10</code></td>
    <td align="right">0</td>
    <td class="bar" align="right">0</td>
    <td align="right">0</td>
    <td align="left"><code>END;</code></td>
  </tr>
  <tr>
    <td align="right"><code>11</code></td>
    <td align="right">0</td>
    <td class="bar" align="right">0</td>
    <td align="right">0</td>
    <td align="left"><code></code></td>
  </tr>
</table>
</center>
</div>
<a name="A66238" />
<h3>Function public.tpcb_upd_accounts() oid=66238 (<a id="toggle_66238"
                href="javascript:toggle_div('toggle_66238', 'div_66238')">show</a>)</h3>
<p>
self_time = 3,086,741 &micro;s<br/>
total_time = 4,335,474 &micro;s
</p>
<table border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td valign="top"><b><code>public.tpcb_upd_accounts&nbsp;</code></b></td>
    <td><b><code>(par_aid integer,<br/>&nbsp;par_delta integer)</code></b></td>
  </tr>
  <tr>
    <td colspan="2">
      <b><code>&nbsp;&nbsp;&nbsp;&nbsp;RETURNS&nbsp;integer</code></b>
    </td>
  </tr>
</table>
<div id="div_66238" style="display: none">
<center>
<table class="linestats" border="1" cellpadding="0" cellspacing="0" width="80%">
  <tr>
    <th width="10%">Line</th>
    <th width="10%">exec_count</th>
    <th width="10%">total_time</th>
    <th width="10%">longest_time</th>
    <th width="60%">Source Code</th>
  </tr>
  <tr>
    <td align="right"><code>0</code></td>
    <td align="right">44902</td>
    <td class="bar" align="right">4335474</td>
    <td align="right">13884</td>
    <td align="left"><code><b>--&nbsp;Function&nbsp;Totals</b></code></td>
  </tr>
  <tr>
    <td align="right"><code>1</code></td>
    <td align="right">0</td>
    <td class="bar" align="right">0</td>
    <td align="right">0</td>
    <td align="left"><code></code></td>
  </tr>
  <tr>
    <td align="right"><code>2</code></td>
    <td align="right">0</td>
    <td class="bar" align="right">0</td>
    <td align="right">0</td>
    <td align="left"><code>BEGIN</code></td>
  </tr>
  <tr>
    <td align="right"><code>3</code></td>
    <td align="right">44902</td>
    <td class="bar" align="right">2512783</td>
    <td align="right">13813</td>
    <td align="left"><code>&nbsp;&nbsp;&nbsp;&nbsp;UPDATE&nbsp;pgbench_accounts&nbsp;SET&nbsp;abalance&nbsp;=&nbsp;abalance&nbsp;+&nbsp;par_delta</code></td>
  </tr>
  <tr>
    <td align="right"><code>4</code></td>
    <td align="right">0</td>
    <td class="bar" align="right">0</td>
    <td align="right">0</td>
    <td align="left"><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;WHERE&nbsp;aid&nbsp;=&nbsp;par_aid;</code></td>
  </tr>
  <tr>
    <td align="right"><code>5</code></td>
    <td align="right">44902</td>
    <td class="bar" align="right">1761205</td>
    <td align="right">1168</td>
    <td align="left"><code>&nbsp;&nbsp;&nbsp;&nbsp;RETURN&nbsp;tpcb_fetch_abalance(par_aid);</code></td>
  </tr>
  <tr>
    <td align="right"><code>6</code></td>
    <td align="right">0</td>
    <td class="bar" align="right">0</td>
    <td align="right">0</td>
    <td align="left"><code>END;</code></td>
  </tr>
  <tr>
    <td align="right"><code>7</code></td>
    <td align="right">0</td>
    <td class="bar" align="right">0</td>
    <td align="right">0</td>
    <td align="left"><code></code></td>
  </tr>
</table>
</center>
</div>
<a name="A66446" />
<h3>Function public.tpcb_fetch_abalance() oid=66446 (<a id="toggle_66446"
                href="javascript:toggle_div('toggle_66446', 'div_66446')">show</a>)</h3>
<p>
self_time = 1,248,733 &micro;s<br/>
total_time = 1,248,733 &micro;s
</p>
<table border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td valign="top"><b><code>public.tpcb_fetch_abalance&nbsp;</code></b></td>
    <td><b><code>(par_aid integer)</code></b></td>
  </tr>
  <tr>
    <td colspan="2">
      <b><code>&nbsp;&nbsp;&nbsp;&nbsp;RETURNS&nbsp;integer</code></b>
    </td>
  </tr>
</table>
<div id="div_66446" style="display: none">
<center>
<table class="linestats" border="1" cellpadding="0" cellspacing="0" width="80%">
  <tr>
    <th width="10%">Line</th>
    <th width="10%">exec_count</th>
    <th width="10%">total_time</th>
    <th width="10%">longest_time</th>
    <th width="60%">Source Code</th>
  </tr>
  <tr>
    <td align="right"><code>0</code></td>
    <td align="right">44902</td>
    <td class="bar" align="right">1248733</td>
    <td align="right">1121</td>
    <td align="left"><code><b>--&nbsp;Function&nbsp;Totals</b></code></td>
  </tr>
  <tr>
    <td align="right"><code>1</code></td>
    <td align="right">0</td>
    <td class="bar" align="right">0</td>
    <td align="right">0</td>
    <td align="left"><code></code></td>
  </tr>
  <tr>
    <td align="right"><code>2</code></td>
    <td align="right">0</td>
    <td class="bar" align="right">0</td>
    <td align="right">0</td>
    <td align="left"><code>DECLARE</code></td>
  </tr>
  <tr>
    <td align="right"><code>3</code></td>
    <td align="right">0</td>
    <td class="bar" align="right">0</td>
    <td align="right">0</td>
    <td align="left"><code>&nbsp;&nbsp;&nbsp;&nbsp;var_abalance&nbsp;&nbsp;&nbsp;&nbsp;integer;</code></td>
  </tr>
  <tr>
    <td align="right"><code>4</code></td>
    <td align="right">0</td>
    <td class="bar" align="right">0</td>
    <td align="right">0</td>
    <td align="left"><code>BEGIN</code></td>
  </tr>
  <tr>
    <td align="right"><code>5</code></td>
    <td align="right">44902</td>
    <td class="bar" align="right">1151844</td>
    <td align="right">1120</td>
    <td align="left"><code>&nbsp;&nbsp;&nbsp;&nbsp;RETURN&nbsp;abalance&nbsp;FROM&nbsp;pgbench_accounts&nbsp;WHERE&nbsp;aid&nbsp;=&nbsp;par_aid;</code></td>
  </tr>
  <tr>
    <td align="right"><code>6</code></td>
    <td align="right">0</td>
    <td class="bar" align="right">0</td>
    <td align="right">0</td>
    <td align="left"><code>END;</code></td>
  </tr>
  <tr>
    <td align="right"><code>7</code></td>
    <td align="right">0</td>
    <td class="bar" align="right">0</td>
    <td align="right">0</td>
    <td align="left"><code></code></td>
  </tr>
</table>
</center>
</div>
<a name="A66241" />
<h3>Function public.tpcb_ins_history() oid=66241 (<a id="toggle_66241"
                href="javascript:toggle_div('toggle_66241', 'div_66241')">show</a>)</h3>
<p>
self_time = 1,150,113 &micro;s<br/>
total_time = 1,150,113 &micro;s
</p>
<table border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td valign="top"><b><code>public.tpcb_ins_history&nbsp;</code></b></td>
    <td><b><code>(par_aid integer,<br/>&nbsp;par_tid integer,<br/>&nbsp;par_bid integer,<br/>&nbsp;par_delta integer)</code></b></td>
  </tr>
  <tr>
    <td colspan="2">
      <b><code>&nbsp;&nbsp;&nbsp;&nbsp;RETURNS&nbsp;void</code></b>
    </td>
  </tr>
</table>
<div id="div_66241" style="display: none">
<center>
<table class="linestats" border="1" cellpadding="0" cellspacing="0" width="80%">
  <tr>
    <th width="10%">Line</th>
    <th width="10%">exec_count</th>
    <th width="10%">total_time</th>
    <th width="10%">longest_time</th>
    <th width="60%">Source Code</th>
  </tr>
  <tr>
    <td align="right"><code>0</code></td>
    <td align="right">44901</td>
    <td class="bar" align="right">1150113</td>
    <td align="right">860</td>
    <td align="left"><code><b>--&nbsp;Function&nbsp;Totals</b></code></td>
  </tr>
  <tr>
    <td align="right"><code>1</code></td>
    <td align="right">0</td>
    <td class="bar" align="right">0</td>
    <td align="right">0</td>
    <td align="left"><code></code></td>
  </tr>
  <tr>
    <td align="right"><code>2</code></td>
    <td align="right">0</td>
    <td class="bar" align="right">0</td>
    <td align="right">0</td>
    <td align="left"><code>BEGIN</code></td>
  </tr>
  <tr>
    <td align="right"><code>3</code></td>
    <td align="right">44901</td>
    <td class="bar" align="right">1062122</td>
    <td align="right">858</td>
    <td align="left"><code>&nbsp;&nbsp;&nbsp;&nbsp;INSERT&nbsp;INTO&nbsp;pgbench_history&nbsp;(tid,&nbsp;bid,&nbsp;aid,&nbsp;delta,&nbsp;mtime)</code></td>
  </tr>
  <tr>
    <td align="right"><code>4</code></td>
    <td align="right">0</td>
    <td class="bar" align="right">0</td>
    <td align="right">0</td>
    <td align="left"><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;VALUES&nbsp;(par_tid,&nbsp;par_bid,&nbsp;par_aid,&nbsp;par_delta,&nbsp;CURRENT_TIMESTAMP);</code></td>
  </tr>
  <tr>
    <td align="right"><code>5</code></td>
    <td align="right">0</td>
    <td class="bar" align="right">0</td>
    <td align="right">0</td>
    <td align="left"><code>END;</code></td>
  </tr>
  <tr>
    <td align="right"><code>6</code></td>
    <td align="right">0</td>
    <td class="bar" align="right">0</td>
    <td align="right">0</td>
    <td align="left"><code></code></td>
  </tr>
</table>
</center>
</div>
</body>
</html>
